package com.cirkana.data;

import java.io.FileInputStream;
import java.util.ArrayList;

public interface IDataProvider {

	void begin();
	
	void commit();
	
	void rollback();
	
	ArrayList<IDataRecord> select(IDataTableDef tableDef) throws DataException;

	ArrayList<IDataRecord> select(IDataTableDef tableDef, ArrayList<IDataCriteria> criterion) throws DataException;

	Integer insert(IDataTableDef tableDef, IDataRecord dataRecord) throws DataException;

	void update(IDataTableDef tableDef, IDataRecord dataRecord) throws DataException;

	void delete(IDataTableDef tableDef, IDataRecord dataRecord) throws DataException;

	ArrayList<String> getFilesList();

	ArrayList<String> getFilesList(String extension);

	FileInputStream openFile(String fileName) throws DataException;

	void saveFile(String fileName, FileInputStream fileInputStream) throws DataException;
}
